// cre#! /usr/bin/env node

const cmd = require('commander')
const chalk = require('chalk')
const options = require('./src/options')
const downGit = require('./src/downLoad')

cmd
	.command('create')
	.description('create project, agrvs project-name config-file-name')
	.action(async (args) => {
		console.log(chalk.red(args))

		typeof args !== 'string' && (console.log(chalk.red('essential option -your-project-name')), process.exit(1))

		// 填选项
		await options()

		// 拉取
		await downGit(args)
	})
cmd.parse(process.argv)
